package top.frsf.pattern.c_behavioral.b_chainrespon.handler.impl;

import top.frsf.pattern.c_behavioral.b_chainrespon.handler.LeaveRequestHandler;
import top.frsf.pattern.c_behavioral.b_chainrespon.handler.dto.Person;

/**
 * @author FRSF
 * @since 2024/8/20 20:33
 */
public class TeamHandler extends LeaveRequestHandler {
    @Override
    protected boolean canHandle(Person person) {
        return person.getLeaveDays() <= 3;
    }

    @Override
    protected void handleRequest(Person person) {
       person.setProcessResult(person.getProcessResult() + "团队主管审批通过!");
    }
}
